package com.service.impl;

import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.dao.NewsDao;
import com.dao.NewsItemDao;
import com.entity.News;
import com.entity.Newsitem;
import com.service.TestServer;
@Service("testServer")
public class TestServerImpl implements TestServer{
    @Resource
    private NewsItemDao newsItemDao;
    @Resource
    private NewsDao newsDao;
    @Override
    public void SaveTest() {
	/*// TODO Auto-generated method stub
	Newsitem newsitem=new Newsitem(null, new Timestamp(System.currentTimeMillis()), null, null);
	newsitem.setId(2);
	//newsItemDao.save(newsitem);
	List<News> list=new ArrayList<News>();
	System.out.println(list);
	for (int i = 0; i < 5; i++) {
	    News news=new News();
	    news.setTitle("test"+i);
	    news.setDescription("描述"+i);
	    news.setUrl("http://www.baidu.com");
	    news.setNewsitem(newsitem);
	    newsDao.save(news);
	    list.add(news);
	}
	//newsitem.setNewses(list);*/
    }
    
}
